<extend name="Public/base"/>
<block name="sidebar">
    <include file="sidemenu" />
</block>
<block name="body">
	<div class="main-title">
		<h2>查看订单详情</h2>
	</div>

	<div class="cf">
	<if condition="$order.status eq 1">
	<a class="btn" href='__URL__/upstatus&id={$order.id}&status=2'>发货</a>
	</if>
	</div>
	<div class="data-table table-striped">
		<table>
			<tbody>
				<tr style="background-color:#ffffff;"><td colspan="2"><b>订单信息</b></td></tr>
				<tr style="background:none;">
					<td width="80">订单编号</td>
					<td>{$order.sn}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">下单时间</td>
					<td>{$order.addtime|date="Y-m-d H:i:s",###}</td>
				</tr>
				<tr style="background:none;">
					<td width="100">订单金额</td>
					<td>{$order.money}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">支付方式</td>
					<td><if condition="$order['paytype'] eq 2">支付宝支付<elseif condition="$order['paytype'] eq 0"/>微信支付</if></td>
				</tr>
				<tr style="background:none;">
					<td width="80">取货方式</td>
					<td><if condition="$order['type'] eq 1">门店自提<else/>送货上门</if></td>
				</tr>
				<tr style="background:none;">
					<td width="80">运费</td>
					<td>{$order.express_money}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">留言</td>
					<td>{$order.note}</td>
				</tr>
				<if condition="$order['type'] eq 0">
				<tr style="background-color:#ffffff;"><td colspan="2"><b>收货人信息</b></td></tr>
				<tr style="background:none;">
					<td width="80">姓名</td>
					<td>{$address.name}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">电话</td>
					<td>{$address.mobile}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">区域</td>
					<td>{$address.area}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">地址</td>
					<td>{$address.address}</td>
				</tr>
				<elseif condition="$order['type'] eq 1"/>
				<tr style="background-color:#ffffff;"><td colspan="2"><b>自提点信息</b></td></tr>
				<tr style="background:none;">
					<td width="80">自提点名称</td>
					<td>{$store.sname}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">联系电话</td>
					<td>{$store.mobile}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">联系地址</td>
					<td>{$store.sadd}</td>
				</tr>
				</if>
				<tr style="background-color:#ffffff;"><td colspan="2">拼团信息</td></tr>
				<tr style="background:none;">
					<td width="80">拼团名称</td>
					<td>{$spell.title}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">购买数量</td>
					<td>{$order.spell_num}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">开团人数</td>
					<td>{$spell.num}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">参团人数</td>
					<td>{$team.join_num}</td>
				</tr>
				<tr style="background:none;">
					<td width="80">拼团状态</td>
					<td>
						<if condition="$spell['state'] eq 2">进行中
						<elseif condition="$spell['state'] eq 3"/>
						<if condition="$team['join_num'] eq $spell['num']">已成团<else/>拼团失败</if>
						</if>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="form-item cf">
			<a class="btn btn-return" href="__URL__/order">返 回</a>
		</div>
	</div>

</block>

<block name="script">
<script type="text/javascript">

//导航高亮
highlight_subnav('{:U('Spell/order')}');

    $(function() {
    	//点击排序
    	$('.list_sort').click(function(){
    		var url = $(this).attr('url');
    		var ids = $('.ids:checked');
    		var param = '';
    		if(ids.length > 0){
    			var str = new Array();
    			ids.each(function(){
    				str.push($(this).val());
    			});
    			param = str.join(',');
    		}

    		if(url != undefined && url != ''){
    			window.location.href = url + '/ids/' + param;
    		}
    	});
    });
</script>
</block>